package hr.ctg.domain.model;

// Generated 2007.05.02 22:50:59 by Hibernate Tools 3.2.0.b9

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.validator.NotNull;

/**
 * DojamPosjetiteljaPortala generated by hbm2java
 */
@Entity
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Table(name = "dojam_posjetitelja_portala")
public class DojamPosjetiteljaPortala implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8907382974387018290L;
	private long idDpp;
	private Korisnik korisnik;
	private String komentar;
	private Date datum;

	public DojamPosjetiteljaPortala() {
	}

	public DojamPosjetiteljaPortala(final long idDpp) {
		this.idDpp = idDpp;
	}

	public DojamPosjetiteljaPortala(final long idDpp, final Korisnik korisnik,
			final String komentar, final Date datum) {
		this.idDpp = idDpp;
		this.korisnik = korisnik;
		this.komentar = komentar;
		this.datum = datum;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id_dpp", unique = true, nullable = false)
	@NotNull
	public long getIdDpp() {
		return idDpp;
	}

	public void setIdDpp(final long idDpp) {
		this.idDpp = idDpp;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_korisnika")
	public Korisnik getKorisnik() {
		return korisnik;
	}

	public void setKorisnik(final Korisnik korisnik) {
		this.korisnik = korisnik;
	}

	@Column(name = "komentar")
	public String getKomentar() {
		return komentar;
	}

	public void setKomentar(final String komentar) {
		this.komentar = komentar;
	}

	@Column(name = "datum", length = 0)
	public Date getDatum() {
		return datum;
	}

	public void setDatum(final Date datum) {
		this.datum = datum;
	}

}
